<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>企业信息管理系统_用户登录</title>
        <link href="../../style/css/login.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="../../style/js/jquery-1.7.2.js"></script>
		<script type="text/javascript">
			$(function(){
				$("form :input.required").each(function(){
					
					var $required = $("<strong class='high'>*</strong>");
					
					$(this).parent().prepend($required);
				});
				$("form :input").blur(function(){
					
						var $parent = $(this).parent();
						$parent.find(".formtips").remove();
						if($(this).is('#username')){
							
							if(this.value==""||this.value.length < 6){
								
								var errorMsg = '请输入至少6位的用户名';
								$parent.append('<span class="formtips onError">'+errorMsg+'</span>');
									
							}else{
								
								var okMsg = '输入正确';
								$parent.append('<span class="formtips onSuccess">'+okMsg+'</span>');
							}
							
						}
						if($(this).is('#pass')){
							
							if(this.value==""||this.value.length < 6){
								
								var errorMsg = '请输入至少6位的密码';
								$parent.append('<span class="formtips onError">'+errorMsg+'</span>');
								
							}else{
								
								var okMsg = '输入正确';
								$parent.append('<span class="formtips onSuccess">'+okMsg+'</span>');	
							}
							
						}
						if($(this).is('#picValidate')){
							
							
							
						}
				});
				$("#sub").click(function(){
					
					$("form .required:input").trigger('blur');
					var numError = $('form .onError').length;
					if(numError){
						
						return false;	
					}
					
					
				});
				
				
			});
			
		
		</script>
    </head>

    <body>

        <div id="tab1">
            <div id="content">
                 <form action="loginValidate.php" method="post">
                    <fieldset class="fs">
                    
                        <div>
                            <label class="STYLE1" for="username">用户名:</label>
                            <input class="required" type="text" name="name" id="username" />
                        </div>
                        <div>
                            <label class="STYLE1" for="pass">密&nbsp;&nbsp;码:</label>
                            <input class="required" type="password" name="password" id="pass" />
                        </div>
                        <div>
                            <label class="STYLE1" for="picValidate">验证码:</label>
                            <input class="required" type="text" id="picValidate" name="picValidate" />
                            <img src="../util/checkcode.php" width="40px" height="15px" />
                           
                        </div>
                        <div id="sub">
                            <input type="submit" id="submit" value="" />
                        </div>
                
                    </fieldset>

                </form>
            
            </div>
               

    	
    </body>
</html>
